import request from "@/request/";

// 获取列表
export const getList = (data) => {
  return request({
    url: "/api/mes-warehouse-service/wh-out-audit/page",
    method: "POST",
    data,
  });
};

// 查看杂项出库详情
export const getOutboundDetail = (data) => {
  return request({
    url: "/api/mes-warehouse-service/misc-out-bill/detail",
    method: "POST",
    data,
  });
};

// 查看杂项出库详情明细
export const getOutboundDetailTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/misc-out-bill/barcode",
    method: "POST",
    data,
  });
};

// 查看生产领料详情
export const getPickingDetail = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/bill-biz/detail",
    method: "POST",
    data,
  });
};

// 查看生产领料详情明细
export const getPickingDetailTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/pick/bill-detail/detail",
    method: "POST",
    data,
  });
};

// 查看成品发货详情
export const getSendDetail = (data) => {
  return request({
    url: "/api/mes-warehouse-service/product-shipment/pc/detail",
    method: "POST",
    data,
  });
};

// 查看成品发货详情明细
export const getSendDetailTable = (data) => {
  return request({
    url: "/api/mes-warehouse-service/product-shipment/barcode",
    method: "POST",
    data,
  });
};

// 查看成品发货明细容器
export const getSendContainerDeatil = (data) => {
  return request({
    url: "/api/mes-production-service/package-label/container/page",
    method: "POST",
    data,
  });
};

// 导出
export const exportData = (data) => {
  return request({
    url: `/api/mes-warehouse-service/purc-order/export`,
    method: "POST",
    responseType: "blob",
    timeout: 300000,
    data: data,
  });
};

//审核
export const audit = (data) => {
  return request({
    url: "/api/mes-warehouse-service/wh-out-audit/audit",
    method: "POST",
    data,
  });
};
export const getEnum = (keyList) => {
  return request({
    url: "/api/mes-warehouse-service/preset/enum/list",
    method: "POST",
    data: {
      keyList,
    },
  });
};
